import Vue from 'vue'
import VueRouter from 'vue-router'
import TaskZeroView from '../views/AnalysisPage/TaskZero.vue'
import TaskOneView from '../views/AnalysisPage/TaskOne.vue'
import TaskTwoView from '../views/AnalysisPage/TaskTwo.vue'
import TaskThreeView from '../views/AnalysisPage/TaskThree.vue'
import BrandDetailByName from '../views/AnalysisPage/BrandDetailByName.vue'
import TaskFourView from '../views/AnalysisPage/TaskFour.vue'
import TaskFiveView from '../views/AnalysisPage/TaskFive.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', component: TaskZeroView, name: 'Home' },
  { path: '/task1', component: TaskOneView, name: 'Task1' },
  { path: '/task2', component: TaskTwoView, name: 'Task2' },
  {
    path: '/task3', // Task3View组件的访问路径
    name: 'TaskThreeView',
    component: TaskThreeView
  },
  {
    path: '/task3/brand/:brandName', // 使用:brandName作为动态路由参数接收品牌名
    name: 'BrandDetailByName',
    component: BrandDetailByName // 根据品牌名展示详情的组件
  },
  {
    path: '/task4', // Task3View组件的访问路径
    name: 'TaskFourView',
    component: TaskFourView
  },
  {
    path: '/task5', // Task3View组件的访问路径
    name: 'TaskFiveView',
    component: TaskFiveView
  }
  //{ path: '/task1', component: AnalysisPage1, name: 'Task1' }, // 与按钮对应的路由
  // 更多任务页的路由...
];

const router = new VueRouter({
  routes
})

export default router
